Optimal. Leaf size=114 \[ \frac{\sec (e+f x) \sqrt{a \sin (e+f x)+a} \sqrt{g \sin (e+f x)}}{a c f}+\frac{\sqrt{g} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{g} \cos (e+f x)}{\sqrt{2} \sqrt{a \sin (e+f x)+a} \sqrt{g \sin (e+f x)}}\right )}{\sqrt{2} \sqrt{a} c f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.489969, antiderivative size = 114, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 40, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {2936, 2782, 205, 2930, 12, 30} \[ \frac{\sec (e+f x) \sqrt{a \sin (e+f x)+a} \sqrt{g \sin (e+f x)}}{a c f}+\frac{\sqrt{g} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{g} \cos (e+f x)}{\sqrt{2} \sqrt{a \sin (e+f x)+a} \sqrt{g \sin (e+f x)}}\right )}{\sqrt{2} \sqrt{a} c f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2936
Rule 2782
Rule 205
Rule 2930
Rule 12
Rule 30
Rubi steps
\begin{align*} \int \frac{\sqrt{g \sin (e+f x)}}{\sqrt{a+a \sin (e+f x)} (c-c \sin (e+f x))} \, dx &=\frac{g \int \frac{\sqrt{a+a \sin (e+f x)}}{\sqrt{g \sin (e+f x)} (c-c \sin (e+f x))} \, dx}{2 a}-\frac{g \int \frac{1}{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}} \, dx}{2 c}\\ &=-\frac{g \operatorname{Subst}\left (\int \frac{1}{c g x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}\right )}{f}+\frac{(a g) \operatorname{Subst}\left (\int \frac{1}{2 a^2+a g x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}\right )}{c f}\\ &=\frac{\sqrt{g} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{g} \cos (e+f x)}{\sqrt{2} \sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}\right )}{\sqrt{2} \sqrt{a} c f}-\frac{\operatorname{Subst}\left (\int \frac{1}{x^2} \, dx,x,\frac{a \cos (e+f x)}{\sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}\right )}{c f}\\ &=\frac{\sqrt{g} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{g} \cos (e+f x)}{\sqrt{2} \sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}\right )}{\sqrt{2} \sqrt{a} c f}+\frac{\sec (e+f x) \sqrt{g \sin (e+f x)} \sqrt{a+a \sin (e+f x)}}{a c f}\\ \end{align*}
Mathematica [A] time = 0.325987, size = 133, normalized size = 1.17 \[ \frac{\sqrt{\sin (e+f x)} \csc (2 (e+f x)) \sqrt{a (\sin (e+f x)+1)} \sqrt{g \sin (e+f x)} \left (2 \sqrt{c} \sqrt{\sin (e+f x)}-\sqrt{2} \sqrt{c-c \sin (e+f x)} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} \sqrt{\sin (e+f x)}}{\sqrt{c-c \sin (e+f x)}}\right )\right )}{a c^{3/2} f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.336, size = 187, normalized size = 1.6 \begin{align*} -{\frac{-1+\cos \left ( fx+e \right ) }{cf\sin \left ( fx+e \right ) \left ( -1+\cos \left ( fx+e \right ) +\sin \left ( fx+e \right ) \right ) }\sqrt{g\sin \left ( fx+e \right ) } \left ( \sqrt{-{\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }}}\cos \left ( fx+e \right ) -2\,\arctan \left ( \sqrt{-{\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }}} \right ) \cos \left ( fx+e \right ) +\sqrt{-{\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) +\sqrt{-{\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }}} \right ){\frac{1}{\sqrt{a \left ( 1+\sin \left ( fx+e \right ) \right ) }}}{\frac{1}{\sqrt{-{\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.57961, size = 365, normalized size = 3.2 \begin{align*} \frac{\frac{4 \, \sqrt{2} \sqrt{g} \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )^{\frac{3}{2}}}{\sqrt{a} c + \frac{\sqrt{a} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac{{\left (\sqrt{a} c + \frac{\sqrt{a} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} - \frac{2 \, \sqrt{2} \sqrt{g} \arctan \left (\sqrt{\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}{\sqrt{a} c} + \frac{\sqrt{2} \sqrt{g} \sqrt{\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} + \sqrt{2} \sqrt{g}}{\sqrt{a} c + \frac{\sqrt{a} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} + \frac{\sqrt{2} \sqrt{g} \sqrt{\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} - \sqrt{2} \sqrt{g}}{\sqrt{a} c + \frac{\sqrt{a} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 3.31889, size = 1006, normalized size = 8.82 \begin{align*} \left [\frac{\sqrt{2} a \sqrt{-\frac{g}{a}} \cos \left (f x + e\right ) \log \left (\frac{17 \, g \cos \left (f x + e\right )^{3} + 4 \, \sqrt{2}{\left (3 \, \cos \left (f x + e\right )^{2} +{\left (3 \, \cos \left (f x + e\right ) + 4\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 4\right )} \sqrt{a \sin \left (f x + e\right ) + a} \sqrt{g \sin \left (f x + e\right )} \sqrt{-\frac{g}{a}} + 3 \, g \cos \left (f x + e\right )^{2} - 18 \, g \cos \left (f x + e\right ) +{\left (17 \, g \cos \left (f x + e\right )^{2} + 14 \, g \cos \left (f x + e\right ) - 4 \, g\right )} \sin \left (f x + e\right ) - 4 \, g}{\cos \left (f x + e\right )^{3} + 3 \, \cos \left (f x + e\right )^{2} +{\left (\cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) - 4\right )} \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right ) - 4}\right ) + 8 \, \sqrt{a \sin \left (f x + e\right ) + a} \sqrt{g \sin \left (f x + e\right )}}{8 \, a c f \cos \left (f x + e\right )}, -\frac{\sqrt{2} a \sqrt{\frac{g}{a}} \arctan \left (\frac{\sqrt{2} \sqrt{a \sin \left (f x + e\right ) + a} \sqrt{g \sin \left (f x + e\right )} \sqrt{\frac{g}{a}}{\left (3 \, \sin \left (f x + e\right ) - 1\right )}}{4 \, g \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \cos \left (f x + e\right ) - 4 \, \sqrt{a \sin \left (f x + e\right ) + a} \sqrt{g \sin \left (f x + e\right )}}{4 \, a c f \cos \left (f x + e\right )}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \frac{\int \frac{\sqrt{g \sin{\left (e + f x \right )}}}{\sqrt{a \sin{\left (e + f x \right )} + a} \sin{\left (e + f x \right )} - \sqrt{a \sin{\left (e + f x \right )} + a}}\, dx}{c} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{\sqrt{g \sin \left (f x + e\right )}}{\sqrt{a \sin \left (f x + e\right ) + a}{\left (c \sin \left (f x + e\right ) - c\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]